import { useRouter } from "vue-router";
const router = useRouter();

// 判断是否为android环境
const isAndroid = () => {
  const flag = navigator.userAgent.includes('androidApp');
}

// router跳转
export const routerPush = (name, query = {}) => {
  router.push({
    name,
    query,
  });
}

// 返回上一页
export const routerBack = () => {
  router.go(-1);
}

// 获取url的参数
export const getRouterQuery = () => {
  const query = router.query;
  return query ? router.query : false;
}